/**
 * @desc
 *
 * @使用场景
 *
 * @author  杨晓东[of1081]
 * @company qianmi.com
 * @Date    2017/6/19
 **/

import React from 'react'
import { StoreProvider, msg } from 'plume2'
import AppStore from './store'
@StoreProvider(AppStore)
export default class TemplateList extends React.Component<any, any> {
    store: AppStore;
    constructor(props) {
        super(props);
        this.state = {
            isReady: false
        }
    }

    componentDidMount() {

        (async()=>{
            await this.store.getTplList();
            await this.store.getBjList();
            await this.store.getRelease();
            await this.store.getfetchDomainUrl();
            this.setState({isReady:true});
        })()
    }

    render() {
        if(!this.state.isReady)return <div />;
        return (
            <div className="layout-main">

                    {this.props.children}

            </div>
        )
    }
}